<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"  %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML>
<html>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ThirdStep</title>

<link href="<%=path%>/static/usercss/css/all.css?jejwej33we" rel="stylesheet" type="text/css">
<jsp:include page="/WEB-INF/web/includ/header.jsp"></jsp:include>


<body>

<section>
<div class="wrap">
    <div id="register">
      <div class="logo"><img src="<%=path %>/static/usercss/images/registerlogo.png" width="300" height="50" alt="分类搜索"></div>
      <div class="respont">
        <h1>修改密码</h1>
        <form action="<%=path %>/web/userLogin/changeForth" method="post" id="form">
          <ol>
            <li>
              <input id="newPass1" name="newPass1" type="password" aria-label="输入新密码" placeholder="输入新密码">
              <label id="message1" style="display: none;">密码至少6个字符</label>
            </li>
            <li class="mgs">
              <input id="newPass" name="newPass" type="password" aria-label="再次输入密码" placeholder="再次输入密码">
              <label id="message" style="display: none;">请保持两次输入密码一致</label>
            </li>
            <li>
              <input class="submit" name="input6" type="submit" value="提交修改密码">
            </li>
          </ol>
        </form>
      </div>
    </div>
  </div>
</div>
</section>
<jsp:include page="/WEB-INF/web/includ/footer.jsp"></jsp:include>
<script type="text/javascript">
var x = false;
var y = false;
	$(function() {
		$("#newPass1").blur(function() {
			var zZ = /\w{6,}/;
			var f = zZ.test($(this).val());
			if(!f){
				x=false;
				$("#message1").css("display","block");
			}else{
				x=true;
				$("#message1").css("display","none");
			}	
		})
		
		$("#newPass").blur(function() {
				var password = $(this).val();
				var password1 = $("#newPass1").val();
				
				if(password!=password1){
						y=false;
						$("#message").css("display","block");
				}else{
						y=true;
						$("#message").css("display","none");
				}
		})
		
		$("#form").submit(function() {
			return x&&y;
		})
	})


</script>
</body>
</html>
